-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support default_extensions_template in SSH #2361
base: main
Are you sure you want to change the base?
feat: support default_extensions_template in SSH #2361
Conversation
Support the default_extensions_template parameter in SSH backend role resource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @radek-sprta ! I left some comments
@@ -243,6 +248,12 @@ func sshSecretBackendRoleWrite(d *schema.ResourceData, meta interface{}) error { | |||
data["default_extensions"] = v | |||
} | |||
|
|||
if provider.IsAPISupported(meta, provider.VaultVersion180) { | |||
if v, ok := d.GetOk("default_extensions_template"); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use d.Get() for booleans. If you test the update path I think you may find that d.GetOk() does not update the field.
VaultVersion180 = version.Must(version.NewSemver(consts.VaultVersion110)) | ||
VaultVersion190 = version.Must(version.NewSemver(consts.VaultVersion190)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are unsupported Vault versions. We need not add checks for them
@@ -243,6 +248,12 @@ func sshSecretBackendRoleWrite(d *schema.ResourceData, meta interface{}) error { | |||
data["default_extensions"] = v | |||
} | |||
|
|||
if provider.IsAPISupported(meta, provider.VaultVersion180) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unsupported Vault version. We need not add a check for it
Description
Support the
default_extensions_template
parameter in SSH backend role resource.Relates OR Closes #0000
Checklist
Output from acceptance testing:
Community Note